package com.wdc.principles.reversalOfDependence.before;

public class Computer {
    private XiJieHardDisk hardDisk;
    private InterCpu interCpu;
    private KingstonMemory kingstonMemory;

    public XiJieHardDisk getHardDisk() {
        return hardDisk;
    }

    public void setHardDisk(XiJieHardDisk hardDisk) {
        this.hardDisk = hardDisk;
    }

    public InterCpu getInterCpu() {
        return interCpu;
    }

    public void setInterCpu(InterCpu interCpu) {
        this.interCpu = interCpu;
    }

    public KingstonMemory getKingstonMemory() {
        return kingstonMemory;
    }

    public void setKingstonMemory(KingstonMemory kingstonMemory) {
        this.kingstonMemory = kingstonMemory;
    }

    public void run() {
        System.out.println("运行计算机");
        String data = hardDisk.get();
        System.out.println("从硬盘上获取的数据：" + data);
        interCpu.run();
        kingstonMemory.save();

    }
}
